
<p style="height:0px;" id="iload"></p>
<script src ="/js/common/user_message.js"></script>
<script src ="/js/common/pubu.js"></script>

<script type="text/javascript">

var container = $("#waterfall_album_detail");
		container.masonry({
			    itemSelector: ".wfc",
				columnWidth: function( containerWidth ) {
				return containerWidth / 5;
			  }
			  });



$(function(){
	YOUXIXIU.MAIN.WATERFALL({
				icontainerId : "imagewall_container",  //内容  ID
				loadingId : "iload",  //               loading ID
				pageId : "",    //分页ID
				url : "/interface/pubu/json_get_pubu_data_by_album_id.php?id={%$g_show.id%}",
				pscreen : 20,
				show_del:"{%$g_show.show_del%}",
				show_add_album_pic:"{%$g_show.show_add_album_pic%}",
				item_class:".wfc",
				icontainerId:"waterfall_album_detail",
				pcount:"{%if $g_show.pcount%}{%$g_show.pcount%}{%else%}20{%/if%}"
	});	

YOUXIXIU.MAIN.BindAddAlbum.bind_add_album_like(".love_album");
YOUXIXIU.MAIN.BindAddAlbum.bind_add_album_good(".love_good");

});


$(".add_pic_url_to_album").bind("click",function(e){
	

	var pic = $("#inter_pic_url").val();
	var content = $("#inter_content").val();
	if(content == $("#inter_content").attr("default-value"))
	{
		content = "";
	}
	content = encodeURIComponent(content);
	var album_id = $("#album_id").val();
	$.ajax({
				url : "/interface/album/json_add_pic_url_to_album.php",
				data : "album_id="+album_id+"&pic="+pic+"&content="+content,
				dataType : 'json',
				success : function(data){
				if(data.error == 1)
				{
					YOUXIXIU.MAIN.Tips.Show(data.errmsg);		
				}
				else
				{
					YOUXIXIU.MAIN.Tips.Show(data.errmsg);
					location.reload();
				}
							
				}
			});	

});

function delete_album_status(status_id)
{
	if(confirm("是否删除这条收藏?"))
	{

		var album_id = $("#album_id").val();
		$.ajax({
				url : "/interface/album/json_user_edit_status_to_album.php?t=json&type=del",
				data : "album_id="+album_id+"&status_id="+status_id,
				dataType : 'json',
				success : function(data){
				if(data.error == 1)
				{
					YOUXIXIU.MAIN.Tips.Show(data.errmsg);		
				}
				else
				{
					YOUXIXIU.MAIN.Tips.Show(data.errmsg);
					location.reload();
				}
							
				}
			});	
	}
	

}

</script>



{%include file="tmpl/poup_detail.html" %}  

{%include file="tmpl/poup_add_album.html" %}   



<script type="text/x-jquery-tmpl" id="add_album_pics"  >
<div style="left: 384px; top: 52px; position: fixed; display: block;" id="lb_addalbum" class="light_box add_album">
<iframe scrolling="no" frameborder="0" style="width: 495px; height: 279px;" class="lb_fix">
</iframe>
<table class="lb_wrap clearfix r5">
<tbody>
<tr>
<td>
<div class="lb_hd">
<span class="lb_title">
替换专辑封面图片<a href="/user/my_album.php" class="to_see_see">
(查看我的专辑)</a>
</span>
<a href="javascript:;" class="lb_close">
</a>
</div>
<div class="lb_bd r5">
<div class="album_bd clearfix">
<div class="">
<div class="fl" style="margin:10px;border:1px solid #000;" >替换专辑封面1 <input type="radio" name="album_pics" value="pic1">  <img width=90 height=90 src="${pic1}"></div>
<div class="fl"  style="margin:10px;border:1px solid #000;" >替换专辑封面2 <input type="radio"  name="album_pics" value="pic2">  <img width=90 height=90 src="${pic2}"></div>
<div class="fl"  style="margin:10px;border:1px solid #000;" >替换专辑封面3 <input type="radio" name="album_pics"  value="pic3">  <img width=90 height=90 src="${pic3}"></div>
<div class="fl"  style="margin:10px;border:1px solid #000;" >替换专辑封面4 <input type="radio" name="album_pics"   value="pic4">  <img width=90 height=90 src="${pic4}"></div>
<div class="pub_out fl">
<div class="btm_sub">

<input type="hidden" name="status_id" id="status_id" value="${status_id}">

<span class="album_add_content"><a href="javascript:;" class="submit r3 add_album_pics_submit" value="${id}">
确定</a></span>
<div class="sub_loading fl r3">
保存中</div>
</div>



</div>
</div>

</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</script>

